<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<!--<link rel="stylesheet" type="text/css" href="../css/app.css" />-->
		<link rel="stylesheet" type="text/css" href="../css/state.css"/>	
	</head>

	<body>

		<style>
			.mui-control-content {
				background-color: white;
				min-height: 215px;
			}
			.mui-control-content .mui-loading {
				margin-top: 50px;
			}
			.mui-content{
				height: 100%;
			}
			.mui-slider{
				height: 100%;
			}
			.mui-slider-group{
				height: 100%;
			}
		</style>
		<!--<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">订单</h1>
		</header>-->
		<div class="mui-content">
			<div id="slider" class="mui-slider">
				<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<a class="mui-control-item" href="#item1mobile">新订单</a>
					<a class="mui-control-item" href="#item2mobile">已接订单</a>
					<a class="mui-control-item" href="#item3mobile">已完成</a>
				</div>
				<div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-4"></div>
				<div class="mui-slider-group">
					<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
						<div id="scroll1" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										<div class="goods">
											<div class="Title">
												<div class="title">麦可视觉</div>
												<div class="order_num">订单号-201708205040440</div>
												<buttonclass="deal"data-id="get"plain="">接单</button>
											</div>
											<div class="list">
												<div class="list_l mui-col-xs-4" link ='../pages/orderDetaill/orderDetail'>
													 
				
													<div class="foodPic">
														<img src="../img/pro1.jpg" alt="" />
														<text>2</text>
													</div>
													<div class="foodPic">
														<img src="../img/pro2.jpg" alt="" />
														<text>1</text>
													</div>
													<div class="foodPic">
														<img src="../img/pro3.jpg" alt="" />
													</div>
														 
												</div>
												<div class="list_r iconfont icon-more"></div>
											</div>
											<div class="Title">
												<div class="time">倒计时</div>
												<div class="total">共5件商品</div>
												<div class="sum">
													<text>实付</text>
													<text>￥25.6</text>
												</div>
											</div>
										</div>
									</li>
									<li class="mui-table-view-cell">
										<div class="goods">
											<div class="Title">
												<div class="title">麦可视觉</div>
												<div class="order_num">订单号-201708205040440</div>
												<buttonclass="deal"data-id="get"plain="">接单</button>
											</div>
											<div class="list">
												<div class="list_l">
													<div class="foodPic">
														<img src="../img/pro1.jpg" alt="" />
														<text>2</text>
													</div>
													<div class="foodPic">
														<img src="../img/pro2.jpg" alt="" />
														<text>1</text>
													</div>
													<div class="foodPic">
														<img src="../img/pro3.jpg" alt="" />
													</div>
												</div>
												<div class="list_r iconfont icon-more"></div>
											</div>
											<div class="Title">
												<div class="time">倒计时</div>
												<div class="total">共5件商品</div>
												<div class="sum">
													<text>实付</text>
													<text>￥25.6</text>
												</div>
											</div>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item2mobile" class="mui-slider-item mui-control-content">
						<div id="scroll2" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item3mobile" class="mui-slider-item mui-control-content">
						<div id="scroll3" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
			mui.init({
				swipeBack: false
			});
			(function($) {
				$('.mui-scroll-wrapper').scroll({
					indicators: true //是否显示滚动条
				});
				var html2 = '<ul class="mui-table-view"><li class="mui-table-view-cell"><div class="goods"><div class="Title"><div class="title">麦可视觉</div><div class="order_num">订单号-201708205040440</div><buttonclass="deal"data-id="get"plain="">接单</button></div><div class="list"><div class="list_l"><div class="foodPic"><img src="../img/pro1.jpg" alt="" /><text>2</text></div><div class="foodPic"><img src="../img/pro2.jpg" alt="" /><text>1</text></div><div class="foodPic"><img src="../img/pro3.jpg" alt="" /></div></div><div class="list_r iconfont icon-more"></div></div><div class="Title"><div class="time">倒计时</div><div class="total">共5件商品</div><div class="sum"><text>实付</text><text>￥25.6</text></div></div></div></li></ul>';
				var html3 = '<ul class="mui-table-view"><li class="mui-table-view-cell"><div class="goods"><div class="Title"><div class="title">麦可视觉</div><div class="order_num">订单号-201708205040440</div><buttonclass="deal"data-id="get"plain="">接单</button></div><div class="list"><div class="list_l"><div class="foodPic"><img src="../img/pro1.jpg" alt="" /><text>2</text></div><div class="foodPic"><img src="../img/pro2.jpg" alt="" /><text>1</text></div><div class="foodPic"><img src="../img/pro3.jpg" alt="" /></div></div><div class="list_r iconfont icon-more"></div></div><div class="Title"><div class="time">倒计时</div><div class="total">共5件商品</div><div class="sum"><text>实付</text><text>￥25.6</text></div></div></div></li></ul>';
				var item2 = document.getElementById('item2mobile');
				var item3 = document.getElementById('item3mobile');
				document.getElementById('slider').addEventListener('slide', function(e) {
					if (e.detail.slideNumber === 1) {
						if (item2.querySelector('.mui-loading')) {
							setTimeout(function() {
								item2.querySelector('.mui-scroll').innerHTML = html2;
							}, 500);
						}
					} else if (e.detail.slideNumber === 2) {
						if (item3.querySelector('.mui-loading')) {
							setTimeout(function() {
								item3.querySelector('.mui-scroll').innerHTML = html3;
							}, 500);
						}
					}
				});
				var sliderSegmentedControl = document.getElementById('sliderSegmentedControl');
				$('.mui-input-group').on('change', 'input', function() {
					if (this.checked) {
						sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted mui-segmented-control-' + this.value;
						//force repaint
						sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style'));
					}
				});
			})(mui);
		mui('#foodPic').on('tap', 'a', function() {
				var item = this;
				var itemID = this.getAttribute('href');
				var extendOptions = {
					itemID: itemID
				};
				console.log(111);
				pushWebView({
					webType: 'upload',
					id: 'upload.html',
					href: 'upload.html',
					aniShow: getaniShow(),
					title: "商品详情",
					isBars: false,
					barsIcon: '',
					extendOptions: extendOptions
				});
			});
		mui(".foodPic").on('tap','div',function(){ 
			//获取id 
			var id = this.getAttribute("id"); 
			//传值给详情页面，通知加载新数据 
			mui.fire(detail,'getDetail',{id:id}); 
			//打开新闻详情 
			mui.openWindow({ 
				id:'upload', 
				url:'upload.html' 
			});
		})
		
		
		
		 mui.plusReady(function() {
		 
			cmd.initTap("mui-col-xs-4");
			cmd.initTapAndData('linkPage'); 
			 
		});
		</script>
		 
	</body>
</html>
